const getNewRoom = () => {
  const selected = document.getElementById('selected');
  const value = selected.value;
  if(value === '') {
    alert('select an option');
    return
  }
  return fetch('/createRoom?&selected=' + value, {
    method: 'get'
  })
    .then(res => {
      return res.text()
    })
    .then(id => window.location.pathname = '/room/' + id)
    .catch(e => console.log(e));
};

/**
 * Created by lz on 2017/6/9.
 */
